<template>
  <div class="px-2 my-3 bg-white py-3" v-if="data">
    <div class="d-flex align-items-center">
        <van-icon :name="data.user.avatar_url ? data.user.avatar_url : 'https://b.yzcdn.cn/vant/icon-demo-1126.png'" size="30" />
        <span class="mx-3">{{ data.user.nick_name }}</span>
        <van-rate
        v-model="data.score"
        :size="25"
        color="#ffd21e"
        void-icon="star"
        void-color="#eee"
        readonly
        />
    </div>
    <p class="my-auto">
        {{ data.content }}
    </p>
    <p class="text-secondary">
        {{ data.create_time }}
    </p>

  </div>

</template>

<script>
export default {
    name:'userComment',
   props:{
    data:{
        type:Object,
        required:false
    }
   },
   created() {
   }
}
</script>

<style lang="less" scoped>
@import url('@/style/bootstrap.css');
</style>

